﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZLCMS.Business.DwzFrame;
using NHibernate;
using ZLCMS.Data.Model;
using ZLCMS.Business;
using ZLCMS.Commands.User.Commands.ProductSku;
using DotNet.Common.Command;

namespace ZLCMS.Web.SystemManage.Basics.ProductSKU
{
    public partial class ProductDelete : System.Web.UI.Page
    {
        protected FrameHelper _framePage;

        protected void Page_Load(object sender, EventArgs e)
        {
            //初始化DWZ控件
            _framePage = new FrameHelper(this);

            ICommandResult<RemoveProductResult> res = new RemoveProductCommand().Execute(new RemoveProductParameter()
              {
                  Ids=Request["ids"]
              });
            if (res.Error)
            {
                _framePage.Alert(new ReturnCode() { statusCode = 300, message = "操作失败-参数错误!" });
            }
            else
            {
                _framePage.Alert(new ZLCMS.Business.DwzFrame.ReturnCode() { statusCode = 200, message = "操作成功!", navTabId = _framePage.NavTabId });
            }
        }
    }
}